package net.hn.hnms.biz.power.domain;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 智呈物联 pan'sx
 * 2022/9/20 16:29
 * 1.0 version
 */
@ApiModel("供电历史数据")
@Entity
@Table(name = "dwd_gdjk_his_sensormonitor", schema = "gdjk", catalog = "huaneng-production")
@Data
public class HisSensorMonitor implements Serializable {
    @Id
    private Long id;

    @JoinColumn(name = "point_code")
    @ManyToOne
    @JsonBackReference("sensorMonitor")
    private SensorInfo sensorInfo;

    @ApiModelProperty("测点类型编码")
    private String pointTypeCode;

    @ApiModelProperty("测点类型名称")
    private String pointTypeName;

    @ApiModelProperty("所属设备编码")
    private String deviceCode;

    @ApiModelProperty("测点值")
    private BigDecimal pointValue;

    @ApiModelProperty("测点数值单位")
    private String pointValueUnit;

    @ApiModelProperty("测点状态")
    private Integer pointStatus;

    @ApiModelProperty("数据时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "Asia/Shanghai"
    )
    private Date dataTime;

    @ApiModelProperty("上传时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "Asia/Shanghai"
    )
    private Date uploadTime;

    @ApiModelProperty("创建时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "Asia/Shanghai"
    )
    private Date createTime;

    @ApiModelProperty("煤矿编码")
    private String mineCode;

    @ApiModelProperty("数据质量")
    private String dataQuality;

    @ApiModelProperty("设备类别  列表查询参数")
    @Transient
    private String deviceType;

//    @ApiModelProperty("变电站  列表查询参数")
//    @Transient
//    private String transformer;

    @ApiModelProperty("安装位置 列表查询参数")
    @Transient
    private String installLocation;


    @ApiModelProperty("设备名称")
    @Transient
    private String deviceName;

    @ApiModelProperty("测点位置")
    @Transient
    private String pointLocation;

    @ApiModelProperty("开始时间")
    @Transient
    private String startTime;

    @ApiModelProperty("结束时间")
    @Transient
    private String endTime;

    @ApiModelProperty("测点编码")
    @Transient
    private String pointCode;
}
